export class PageInfo {
    private pageNum: number;
    private pageSize: number;
    private totalPages: number;
    private totalSize: number;

    constructor({pageNum, pageSize, totalPages, totalSize}:{pageNum?:number, pageSize?:number, totalPages?: number, totalSize?: number}) {
        this.pageNum = pageNum || 1;
        this.pageSize = pageSize || 10;
        this.totalPages = totalPages || 0;
        this.totalSize = totalSize || 0;
    }

    getPageNum() {
        return this.pageNum;
    }

    setPageNum(pageNum: number) {
        this.pageNum = pageNum;
    }

    getPageSize() {
        return this.pageSize;
    }

    setPageSize(pageSize: number) {
        this.pageSize = pageSize;
    }

    getTotalPages() {
        return this.totalPages;
    }
    
    setTotalPages(totalPages: number) {
        this.totalPages = totalPages;
    }

    getTotalSize() {
        return this.totalSize;
    }

    setTotalSize(totalSize: number) {
        this.totalSize = totalSize;
    }
}